package com.rms.hkpc.model;

import com.rms.hkpc.callback.Callback;
import com.rms.hkpc.model.listener.OnResultListener;
import com.rms.hkpc.util.OKHttpUtil;

import java.lang.reflect.Type;

public class InsightModel {
    public void getData(String proId, final OnResultListener listener, Type typeofT) {
//        OKHttpUtil.getInstance().getAsync(OKHttpUtil.NET_URL + "/api/esp/dashboards?projId=" + proId,
        OKHttpUtil.getInstance().getAsync(OKHttpUtil.NET_URL + "/api/dashboards?projId=" + proId,
                new Callback() {
                    @Override
                    public void onSuccess(Object obj) {
                        listener.onSuccess(obj);
                    }

                    @Override
                    public void onFailed(Exception e) {
                        listener.onFails(e);
                    }
                }, typeofT);

    }

}
